import java.awt.Graphics;


public class Deska {
	private int x, y;
	private int w, h;
	
	public Deska(int xE, int yE)
	{
		setWH(xE, yE);
		x = (int)((xE - w) / 2);
		y = (int)(0.95 * yE);
	}
	
	public void setX(int nX)
	{
		x = nX;
	}
	
	public void setY(int nY)
	{
		y = nY;
	}
	
	public void setWH(int xE, int yE)
	{
		w = (int)(0.1 * xE);
		h = (int)(0.01 * yE);
	}
	
	public int getX()
	{
		return x;
	}
	
	public int getY()
	{
		return y;
	}
	
	public int getW()
	{
		return w;
	}
	
	public int getH()
	{
		return h;
	}
	
	public void wyswietlDeske(Graphics g)
	{
		g.fillRect(x, y, w, h);
	}
	
	public Odcinek zwrocOdcinek()
	{
		return new Odcinek(x, y, x + w, y);
	}
	
	
}
